(this.webpackJsonparimo=this.webpackJsonparimo||[]).push([[12],{309:function(e,a,t){"use strict";t.d(a,"a",(function(){return c}));var n=t(105),r=t(0),s=t.n(r),c=function(e){var a=e.children,t=Object(n.a)(e,["children"]);return t.owner===t.verifyId?s.a.createElement(s.a.Fragment,null,a):s.a.createElement(s.a.Fragment,null)}},376:function(e,a,t){"use strict";var n=t(5),r=t(10),s=t(0),c=t.n(s),l=t(1),o=t.n(l),i=t(4),m=t.n(i),p=t(3),u={tag:p.tagPropType,className:o.a.string,cssModule:o.a.object},d=function(e){var a=e.className,t=e.cssModule,s=e.tag,l=Object(r.a)(e,["className","cssModule","tag"]),o=Object(p.mapToCssModules)(m()(a,"input-group-text"),t);return c.a.createElement(s,Object(n.a)({},l,{className:o}))};d.propTypes=u,d.defaultProps={tag:"span"},a.a=d},390:function(e,a,t){"use strict";var n=t(5),r=t(10),s=t(9),c=t(14),l=t(0),o=t.n(l),i=t(1),m=t.n(i),p=t(4),u=t.n(p),d=t(3),f={children:m.a.node,inline:m.a.bool,tag:d.tagPropType,innerRef:m.a.oneOfType([m.a.object,m.a.func,m.a.string]),className:m.a.string,cssModule:m.a.object},E=function(e){function a(a){var t;return(t=e.call(this,a)||this).getRef=t.getRef.bind(Object(s.a)(t)),t.submit=t.submit.bind(Object(s.a)(t)),t}Object(c.a)(a,e);var t=a.prototype;return t.getRef=function(e){this.props.innerRef&&this.props.innerRef(e),this.ref=e},t.submit=function(){this.ref&&this.ref.submit()},t.render=function(){var e=this.props,a=e.className,t=e.cssModule,s=e.inline,c=e.tag,l=e.innerRef,i=Object(r.a)(e,["className","cssModule","inline","tag","innerRef"]),m=Object(d.mapToCssModules)(u()(a,!!s&&"form-inline"),t);return o.a.createElement(c,Object(n.a)({},i,{ref:l,className:m}))},a}(l.Component);E.propTypes=f,E.defaultProps={tag:"form"},a.a=E},392:function(e,a,t){"use strict";var n=t(5),r=t(10),s=t(0),c=t.n(s),l=t(1),o=t.n(l),i=t(4),m=t.n(i),p=t(3),u={tag:p.tagPropType,className:o.a.string,cssModule:o.a.object},d=function(e){var a=e.className,t=e.cssModule,s=e.tag,l=Object(r.a)(e,["className","cssModule","tag"]),o=Object(p.mapToCssModules)(m()(a,"card-footer"),t);return c.a.createElement(s,Object(n.a)({},l,{className:o}))};d.propTypes=u,d.defaultProps={tag:"div"},a.a=d},430:function(e,a,t){},443:function(e,a,t){"use strict";var n=t(5),r=t(10),s=t(0),c=t.n(s),l=t(1),o=t.n(l),i=t(4),m=t.n(i),p=t(3),u={tag:p.tagPropType,size:o.a.string,className:o.a.string,cssModule:o.a.object},d=function(e){var a=e.className,t=e.cssModule,s=e.tag,l=e.size,o=Object(r.a)(e,["className","cssModule","tag","size"]),i=Object(p.mapToCssModules)(m()(a,"input-group",l?"input-group-"+l:null),t);return c.a.createElement(s,Object(n.a)({},o,{className:i}))};d.propTypes=u,d.defaultProps={tag:"div"},a.a=d},444:function(e,a,t){"use strict";var n=t(5),r=t(10),s=t(0),c=t.n(s),l=t(1),o=t.n(l),i=t(4),m=t.n(i),p=t(3),u=t(376),d={tag:p.tagPropType,addonType:o.a.oneOf(["prepend","append"]).isRequired,children:o.a.node,className:o.a.string,cssModule:o.a.object},f=function(e){var a=e.className,t=e.cssModule,s=e.tag,l=e.addonType,o=e.children,i=Object(r.a)(e,["className","cssModule","tag","addonType","children"]),d=Object(p.mapToCssModules)(m()(a,"input-group-"+l),t);return"string"===typeof o?c.a.createElement(s,Object(n.a)({},i,{className:d}),c.a.createElement(u.a,{children:o})):c.a.createElement(s,Object(n.a)({},i,{className:d,children:o}))};f.propTypes=d,f.defaultProps={tag:"div"},a.a=f},611:function(e,a,t){},822:function(e,a,t){"use strict";t.r(a);var n=t(2),r=t(6),s=t(7),c=t(12),l=t(13),o=t(0),i=t.n(o),m=t(17),p=t(36),u=t(149),d=t(119),f=t(147),E=t(500),j=t(501),b=t(390),h=t(502),g=t(503),N=t(107),y=t(498),v=t(514),O=t(391),C=t(499),P=t(392),x=t(371),k=t(313),T=t(28),q=t(48),M=t(176),D=t(158),I=(t(611),t(331)),z=t(314),w=t(8),R=t(52),S=t(574),_=t(509),F=t(510),L=t(389),U=t(443),V=t(444),A=t(511),J=t(33),K=t(150),B=t(179),W=(t(430),t(568)),G=t(570),H=t(347),Q=t(427),X=t(308),Y=t(181),Z=t(159),$=t(157),ee=t(121),ae=t(124),te=t(171),ne=t(330),re=W.a().shape({name:W.c().required("\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e"),link:W.c().required("\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e")}),se=function(e){Object(c.a)(t,e);var a=Object(l.a)(t);function t(e){var s;return Object(r.a)(this,t),(s=a.call(this,e)).spotifyFilter=function(){return s.props.spotify_list.map((function(e){return Object(n.a)(Object(n.a)({},e),{},{value:e.id,artistId:e.id,label:e.name})}))},s.addUser=function(){Object(q.l)(s.state.user)?s.props.addUserToProject({project_id:s.props.projectId,email:s.state.user}):s.props.setNotification("\u041d\u0435\u0432\u0435\u0440\u043d\u0430\u044f \u043f\u043e\u0447\u0442\u0430!","error")},s.Option=function(e){return i.a.createElement(Q.z.Option,e,i.a.createElement("div",{className:"d-flex justify-content-start align-items-center"},i.a.createElement("img",{width:24,height:24,src:e.data.image,alt:""}),i.a.createElement("p",{className:"m-0 ml-2"},e.data.label)))},s.spotifyChange=function(e){s.props.setData(J.c,{spotify:e})},s.searchSpotify=function(e){s.props.getSpotifyList({name:e})},s.onInputChange=function(e,a){switch(a.action){case"input-change":return void s.searchSpotify(e);default:return}},s.filterOptions=function(){return!0},s.toggleModal=function(){s.props.setData(J.d,!1),s.props.setData(J.a)},s.state={name:"",link:"",spotify:"",description:"",user:""},s.handleSubmit=s.handleSubmit.bind(Object(R.a)(s)),s.toggleModal=s.toggleModal.bind(Object(R.a)(s)),s.handleInputChange=s.handleInputChange.bind(Object(R.a)(s)),s}return Object(s.a)(t,[{key:"handleSubmit",value:function(e){"update"===this.props.requestType?this.props.updateProject(e,this.props.projectId,this.props.requestParams):this.props.createProject(e,this.props.requestParams)}},{key:"handleInputChange",value:function(e){this.props.setData(J.c,Object(w.a)({},e.target.name,e.target.value))}},{key:"render",value:function(){var e=this;return i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{isOpen:this.props.modal,toggle:this.toggleModal},i.a.createElement(_.a,{toggle:this.toggleModal},"update"===this.props.requestType?"\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442":"\u041d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442"),i.a.createElement(G.c,{enableReinitialize:!0,initialValues:this.props.modalData,onSubmit:this.handleSubmit,validationSchema:re},(function(a){var t=a.errors,n=a.touched;return i.a.createElement(G.b,{className:"project-modal-form"},e.props.spinner.includes("projects-create")&&i.a.createElement(H.a,null),i.a.createElement(F.a,null,i.a.createElement(h.a,{className:"my-1"},i.a.createElement(L.a,{for:"name",className:"project-modal-label"},"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430"),i.a.createElement(G.a,{type:"text",name:"name",id:"name",autoComplete:"off",placeholder:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430",onChange:e.handleInputChange,value:e.props.modalData.name,className:"form-control project-modal-input ".concat(t.name&&n.name&&"is-invalid")}),t.name&&n.name?i.a.createElement("div",{className:"invalid-tooltip"},t.name):null),i.a.createElement(h.a,{className:"my-2"},i.a.createElement(L.a,{for:"link",className:"project-modal-label"},"\u0421\u0441\u044b\u043b\u043a\u0430 VK"),i.a.createElement(G.a,{type:"text",name:"link",id:"link",autoComplete:"off",placeholder:"\u0421\u0441\u044b\u043b\u043a\u0430 VK",onChange:e.handleInputChange,value:e.props.modalData.link,className:"form-control project-modal-input ".concat(t.link&&n.link&&"is-invalid")}),t.link&&n.link?i.a.createElement("div",{className:"invalid-tooltip"},t.link):null),i.a.createElement(h.a,{className:"my-2"},i.a.createElement(L.a,{for:"spotify",className:"project-modal-label"},"\u0418\u043c\u044f \u0430\u0440\u0442\u0438\u0441\u0442\u0430 \u043d\u0430 Spotify"),i.a.createElement(X.a,{className:"",classNamePrefix:"dark_select",value:{value:e.props.modalData.spotify.artistId||"",label:e.props.modalData.spotify.name||""},options:e.spotifyFilter(),isClearable:!1,onChange:e.spotifyChange,name:"typesList",components:{Option:e.Option},onInputChange:e.onInputChange,filterOption:e.filterOptions}),t.spotify&&n.spotify?i.a.createElement("div",{className:"invalid-tooltip"},t.spotify):null),i.a.createElement(h.a,{className:"my-2"},i.a.createElement(L.a,{for:"description",className:"project-modal-label"},"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435"),i.a.createElement(G.a,{component:"textarea",rows:"4",name:"description",id:"description",autoComplete:"off",placeholder:"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",onChange:e.handleInputChange,value:e.props.modalData.description||"",className:"form-control project-modal-input project-modal-textarea"})),"update"===e.props.requestType&&i.a.createElement(i.a.Fragment,null,i.a.createElement("h5",{className:"mt-2"},i.a.createElement(Y.a,{size:20})," \u0421\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430"),i.a.createElement("hr",null),i.a.createElement(E.a,{className:"mb-1"},i.a.createElement(j.a,{xs:12,sm:6},i.a.createElement("span",{className:"dark-grey"},"\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c")),i.a.createElement(j.a,{xs:12,sm:6,className:"mt-1 mt-sm-0"},i.a.createElement(E.a,null,i.a.createElement(j.a,{xs:3},i.a.createElement(Z.a,{size:20})),i.a.createElement(j.a,{xs:3},i.a.createElement($.a,{size:20})),i.a.createElement(j.a,{xs:3},i.a.createElement(ee.a,{size:20})),i.a.createElement(j.a,{xs:3})))),e.props.modalData.owners&&e.props.modalData.owners.map((function(a){return i.a.createElement(E.a,{key:a.id,className:"mt-1"},i.a.createElement(j.a,{xs:12,sm:6},i.a.createElement(ae.a,{className:"mr-1",size:20}),i.a.createElement("span",null,a.email)),a.id!==e.props.modalData.owner.id&&i.a.createElement(j.a,{xs:12,sm:6,className:"mt-1 mt-sm-0"},i.a.createElement(E.a,null,i.a.createElement(j.a,{xs:3},i.a.createElement(ne.a,{disabled:!0,color:"primary",icon:i.a.createElement(K.a,{className:"vx-icon",size:16}),defaultChecked:!0})),i.a.createElement(j.a,{xs:3},i.a.createElement(ne.a,{disabled:!0,color:"primary",icon:i.a.createElement(K.a,{className:"vx-icon",size:16}),defaultChecked:!0})),i.a.createElement(j.a,{xs:3},i.a.createElement(ne.a,{disabled:!0,color:"primary",icon:i.a.createElement(K.a,{className:"vx-icon",size:16}),defaultChecked:!0})),i.a.createElement(j.a,{xs:3},i.a.createElement(B.a,{onClick:function(){return e.props.deleteUserFromProject(a.id,{project_id:e.props.projectId})},className:"danger cursor-pointer",size:20})))))})),i.a.createElement("h6",{className:"text-center mt-3"},i.a.createElement("span",null,"\u043f\u0440\u0438\u0433\u043b\u0430\u0441\u0438\u0442\u044c")),i.a.createElement(U.a,{className:"mb-2"},i.a.createElement(G.a,{type:"text",name:"user",id:"user",autoComplete:"off",placeholder:"",onChange:function(a){return e.setState({user:a.target.value})},value:e.state.user,className:"form-control project-modal-input"}),i.a.createElement(V.a,{addonType:"append",className:"button-append"},i.a.createElement(N.a.Ripple,{onClick:e.addUser,color:"flat-primary"},i.a.createElement(te.a,{size:20})," \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c"))))),i.a.createElement(A.a,null,"update"===e.props.requestType&&i.a.createElement(N.a.Ripple,{color:"danger",onClick:function(){return e.props.deleteProject(e.props.projectId,e.props.requestParams)},className:"project-modal-button"},i.a.createElement(B.a,{className:"btn-icon",size:14}),"\u0423\u0434\u0430\u043b\u0438\u0442\u044c"),i.a.createElement(N.a.Ripple,{color:"primary",type:"submit",className:"project-modal-button"},"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c")))}))))}}]),t}(i.a.Component),ce=Object(m.b)((function(e){return{modal:e.projects.modal,modalData:e.projects.modalData,spinner:e.helper.spinner,requestParams:e.projects.requestParams,requestType:e.projects.requestType,projectId:e.projects.projectId,spotify_list:e.projects.spotify_list}}),{setData:T.a,getSpotifyList:k.g,createProject:k.b,updateProject:k.i,deleteProject:k.c,setNotification:T.d,addUserToProject:k.a,deleteUserFromProject:k.d})(se),le=t(25),oe=t(309),ie=function(e){Object(c.a)(t,e);var a=Object(l.a)(t);function t(){var e;Object(r.a)(this,t);for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];return(e=a.call.apply(a,[this].concat(c))).state={value:""},e.requestTime=null,e.onPageChange=function(a){e.props.setRequestParams({page:a}),e.props.getProjectList(Object(n.a)(Object(n.a)({},e.props.requestParams),{},{page:a}))},e.handleOnChange=function(a){e.setState({value:a.target.value}),e.props.setRequestParams({search:a.target.value,page:1}),clearTimeout(e.requestTime),e.requestTime=setTimeout((function(){e.props.getProjectList(Object(n.a)(Object(n.a)({},e.props.requestParams),{},{search:e.state.value}))}),700)},e.modalOpen=function(a){e.props.setData(J.j,a),e.props.setData(J.d,!0)},e}return Object(s.a)(t,[{key:"componentDidMount",value:function(){this.props.getProjectList(this.props.requestParams)}},{key:"componentWillUnmount",value:function(){this.props.setData(J.b)}},{key:"render",value:function(){var e=this;return i.a.createElement(i.a.Fragment,null,i.a.createElement(x.a,{breadCrumbTitle:"\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432",breadCrumbParent:"\u041f\u0440\u043e\u0435\u043a\u0442\u044b",breadCrumbActive:"\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432"}),i.a.createElement(ce,null),i.a.createElement(E.a,{id:"search-website"},i.a.createElement(j.a,{xs:"12",md:"8",xl:"6"},i.a.createElement("div",{className:"project-search search-bar mb-2"},i.a.createElement(b.a,null,i.a.createElement(h.a,{className:"position-relative has-icon-left mb-0"},i.a.createElement(g.a,{type:"text",className:"round",placeholder:"\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439 \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c",value:this.state.value,onChange:this.handleOnChange}),i.a.createElement("div",{className:"form-control-position px-1"},i.a.createElement(M.a,{size:15})))))),i.a.createElement(j.a,{xs:"12",md:"4",xl:"6",className:"d-flex justify-content-md-end project-add-btn-container mb-1"},i.a.createElement(N.a.Ripple,{color:"danger",className:"project-add-btn px-md-6",onClick:function(){return e.modalOpen("create")}},"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442"))),i.a.createElement(E.a,null,this.props.spinner.includes("projects-list")&&i.a.createElement(z.a,null),this.props.list.map((function(a,t){return i.a.createElement(j.a,{xs:"12",md:"6",xl:"4",key:t,className:"mb-2"},i.a.createElement(y.a,{className:"mb-0 h-100"},i.a.createElement(v.a,null,i.a.createElement("div",{className:"project-card-header"},i.a.createElement(O.a,{className:"pt-1 project-card-title"},i.a.createElement("span",null,a.name&&a.name.length>23?"".concat(a.name.slice(0,20),"..."):a.name),i.a.createElement(oe.a,{owner:a.owner.id,verifyId:e.props.verifyId},i.a.createElement("span",{className:"project-edit-icon",onClick:function(){e.modalOpen("update"),e.props.getProject(a.id,Object(n.a)(Object(n.a)({},e.props.requestParams),{},{includes:e.props.requestParams.includes+",owners"}))}},i.a.createElement(D.a,{color:"#EBEEFC",width:"18px"})))),i.a.createElement("div",{className:"project-card-services pt-1 d-flex justify-content-end"},i.a.createElement(p.b,{to:"/dashboard",className:"project-link",onClick:function(){return e.props.setData(le.e,Object(n.a)(Object(n.a)({},a),{},{value:a.id,label:a.name}))}},i.a.createElement("span",null,"\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430"),i.a.createElement(u.a,{className:"fonticon-wrap",size:15})),i.a.createElement(p.b,{to:"/events?project_id=".concat(a.id),className:"project-link"},i.a.createElement("span",null,"\u0421\u043e\u0431\u044b\u0442\u0438\u044f"),i.a.createElement(d.a,{className:"fonticon-wrap",size:15}))))),i.a.createElement(C.a,{className:"pb-0 pt-2"},i.a.createElement("div",{className:"d-flex justify-content-start project-card-content"},i.a.createElement("div",null,i.a.createElement("span",{className:"project-card-item-title pr-1"},"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435")),i.a.createElement("div",{className:"desc"},i.a.createElement("p",null,Object(q.i)(a.description||"",90))))),i.a.createElement(P.a,{className:"border-0 pt-0"},i.a.createElement("div",{className:"project-card-footer"},i.a.createElement(E.a,{className:"d-flex justify-content-between"},i.a.createElement(j.a,{xs:"auto",className:"d-flex align-items-center justify-content-end pt-1"},i.a.createElement("span",null,a.created_at?Object(q.a)(Object(q.e)(a.created_at),"dd.mm.yyyy"):"")),i.a.createElement(j.a,{xs:"auto",className:"d-flex justify-content-end project-card-footer pt-1"},i.a.createElement(p.b,{to:"/events?project_id=".concat(a.id),className:"project-link"},i.a.createElement("span",null,"\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435"),i.a.createElement(f.a,{className:"ml-1 fonticon-wrap",size:18}))))))))}))),i.a.createElement(I.a,{pagination:this.props.meta.pagination,onPageChange:this.onPageChange}))}}]),t}(i.a.Component);a.default=Object(m.b)((function(e){return{requestParams:e.projects.requestParams,spinner:e.helper.spinner,list:e.projects.list,meta:e.projects.meta,verifyId:e.users.data.verify_id}}),{setRequestParams:k.h,getProjectList:k.f,getProject:k.e,setData:T.a})(ie)}}]);
//# sourceMappingURL=12.553233ba.chunk.js.map